package com.fxl.dao;

import com.fxl.entity.User2;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface User2Mapper {

    @Select("SELECT * FROM user")
    List<User2> findAll();

    @Select("SELECT * FROM user WHERE id = #{id}")
    User2 findById(Integer id);

    @Select("SELECT * FROM user WHERE username = #{username}")
    List<User2> findByUsername(String username);
}